package com.example.subbeancontext;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

@Service
public class TestBean {

    @Value("${env.test:hahaha}")
    private String test;

    public TestBean() {
        System.out.println("init TestBean");
    }

    public void print(){
        System.out.println("no args TestBean print...");
    }

    public void print(String msg){
        System.out.println("retransfrom after: "+msg);
    }



    public String toString(){
        return test;
    }
}
